<div id="genre-results">
  <% genres.each do |genre| %>
    <p>
      <%=h genre.name %>
	  <% if params[:artist_id] %>
        <%= link_to 'Select', artist_genre_links_path(:genre_id => genre.id), :method => :post %>
	  <% elsif params[:edition_id] %>
	    <%= link_to 'Select', edition_genre_links_path(:genre_id => genre.id), :method => :post %>
	  <% elsif params[:song_id] %>
	    <%= link_to 'Select', song_genre_links_path(:genre_id => genre.id), :method => :post %>
	  <% end %>
      <hr />
	</p>
  <% end %>

  <p>
    <%= (genres.empty?) ? "No genres were found with that name." : "Not what you were looking for?" %>
    Create an entry for <strong><%=h params[:search][:name_like] %></strong>?
    <% if params[:artist_id] %>
      <%= link_to 'Select', artist_genre_links_path(:genre_name => params[:search][:name_like]), :method => :post %>
	<% elsif params[:edition_id] %>
	  <%= link_to 'Select', edition_genre_links_path(:genre_name => params[:search][:name_like]), :method => :post %>
	<% elsif params[:song_id] %>
	  <%= link_to 'Select', song_genre_links_path(:genre_name => params[:search][:name_like]), :method => :post %>
	<% end %>
  </p>
</div>